package br.com.bb.cslsp.modelo.acesso;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

@Entity
@Table(name = "acesso_registro", schema = "apps")
@NamedQueries({ @NamedQuery(name = "buscaPorIdChave", query = "select a from AcessoRegistro a where a.id = ?1 and a.chave = ?2"), })
public class AcessoRegistro implements Serializable { 

	public static String BUSCA_POR_ID_E_CHAVE = "buscaPorIdChave";

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long id;

	@ManyToOne
	private Acesso acesso;

	private String chave;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Acesso getAcesso() {
		return acesso;
	}

	public void setAcesso(Acesso acesso) {
		this.acesso = acesso;
	}

	public String getChave() {
		return chave;
	}

	public void setChave(String chave) {
		this.chave = chave;
	}

}
